package com.ds.infrastructure.hyperspace.console.model.request.container;

import com.ds.infrastructure.hyperspace.console.entity.enums.TbPublicEnum;
import com.ds.infrastructure.hyperspace.console.entity.table.TbContainerConfig;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * @author: yaozhendong
 * @create: 2019-10-16 10:51
 **/
@Data
@NoArgsConstructor
public class GetLastIdContainerForm {
    @NotNull
    private Long stageId;

    public static TbContainerConfig toEntity4LastContainerIdWhere(Long stageId) {
        TbContainerConfig tbContainerConfig = new TbContainerConfig();
        tbContainerConfig.setStageId(stageId);
        tbContainerConfig.setGmtIsDeleted(TbPublicEnum.GMD_IS_DEL.NO.code);
        return tbContainerConfig;
    }
}
